const state = {
	statusBarHeight: 0,
	screenHeight: 0,
	screenWidth: 0
}
const getters = {

}
const mutations = {
	setSystemInfo(state , systemInfo) {
		//console.log('systemInfo',systemInfo);
		for(let key in systemInfo) {
		   if(state.hasOwnProperty(key)){
			   state[key] = systemInfo[key]
		   }
		}
		console.log('state',state);
	}
}
const actions = {
	loadSystemInfo({commit}) {
		uni.getSystemInfo({
			success: (res) => {
				console.log(res);
				commit("setSystemInfo", res)
			}
		})
	}
}

export default {
	namespaced: true,
	state,
	getters,
	actions,
	mutations
}
